import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  server:{
    port:5000,
    proxy:{
        '/api':{
        target:"http://localhost:8083",
        rewrite: (path) => path.replace(/^\/api/, '') // 确保路径重写正确
      },
       '/resource':{
        target:"http://localhost:8083",
        rewrite: (path) => path.replace(/^\/resource/, '') // 确保路径重写正确
      }
    }
  }
})
